﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using visinia.SmartEngine.Cache;

namespace viNews.Classes
{
    /// <summary>
    /// A utility class to ease access to different paths of the site
    /// </summary>
    public class viNewsWebRoots
    {
        public static string GetImagesRoot()
        {
            string root = (string)DataCache.GetCache("viNews_ImagesRoot");
            if (root == null)
            {
                root = "viNews/Images/";
                DataCache.SetCache("viNews_ImagesRoot", root);
            }
            return root;
        }

        public static string GetVideosRoot()
        {
            string root = (string)DataCache.GetCache("viNews_VideosRoot");
            if (root == null)
            {
                root = "viNews/Videos/";
                DataCache.SetCache("viNews_VideosRoot", root);
            }
            return root;
        }
    }
}
